Extract account logic from BaseActivity into a mixin#5064
Merged
tobiasKaminsky merged 1 commit intoFeb 10, 2020
Merged
Conversation
ezaquarii
force-pushed
the
ezaquarii/extract-account-logic-from-base-activity-into-mixin
branch
from
January 14, 2020 05:45
62185ae to
3148156
Compare
Codecov Report
@@ Coverage Diff @@
## master #5064 +/- ##
============================================
+ Coverage 17.71% 19.96% +2.24%
Complexity 3 3
============================================
Files 392 397 +5
Lines 33147 33232 +85
Branches 4656 4662 +6
============================================
+ Hits 5873 6635 +762
+ Misses 26324 25516 -808
- Partials 950 1081 +131
|
ezaquarii
force-pushed
the
ezaquarii/extract-account-logic-from-base-activity-into-mixin
branch
from
January 14, 2020 05:52
3148156 to
75c6622
Compare
ezaquarii
force-pushed
the
ezaquarii/extract-account-logic-from-base-activity-into-mixin
branch
4 times, most recently
from
January 29, 2020 06:05
5472a0a to
0a56b09
Compare
ezaquarii
force-pushed
the
ezaquarii/extract-account-logic-from-base-activity-into-mixin
branch
from
February 3, 2020 20:47
0a56b09 to
3d84267
Compare
ezaquarii
force-pushed
the
ezaquarii/extract-account-logic-from-base-activity-into-mixin
branch
2 times, most recently
from
February 3, 2020 22:54
692ad68 to
51f893f
Compare
Member
|
@ezaquarii looks good to me code-wise. 👍 |
Collaborator
Author
|
Oupsie! This is my private debug code - it should not be there. I'll fix it.
…On February 4, 2020 8:11:07 AM UTC, Tobias Kaminsky ***@***.***> wrote:
tobiasKaminsky commented on this pull request.
> @@ -32,6 +33,7 @@
@OverRide
public final void onActivityCreated(Activity activity, Bundle
savedInstanceState) {
+ Log.d("mytag",
String.format("ActivityInjector.onActivityCreated(): %s", activity));
Why do we use Log instead of Log_OC here?
"mytag" is also too generic. You could generate a tag from the
activity?
Or call it "ActivityInjector"
> @@ -1359,12 +1358,13 @@ private View findQuotaViewById(int id) {
*/
protected abstract void restart();
- @OverRide
- protected void
onAccountCreationSuccessful(AccountManagerFuture<Bundle> future) {
- super.onAccountCreationSuccessful(future);
- updateAccountList();
- restart();
- }
+// @OverRide
Can you remove this?
> @OverRide
protected void onCreate(Bundle savedInstanceState) {
Log_OC.v(TAG, "onCreate() start");
-
+ Log.d("mytag", "FileDisplayActivity.onCreate(): before
super");
Same questions regarding log :-)
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#5064 (review)
|
ezaquarii
force-pushed
the
ezaquarii/extract-account-logic-from-base-activity-into-mixin
branch
3 times, most recently
from
February 5, 2020 00:14
6b2f879 to
7b64b1d
Compare
Member
|
Did a smoke test and it works 👍 |
tobiasKaminsky
requested changes
Feb 5, 2020
Signed-off-by: Chris Narkiewicz <hello@ezaquarii.com>
ezaquarii
force-pushed
the
ezaquarii/extract-account-logic-from-base-activity-into-mixin
branch
from
February 5, 2020 22:09
7b64b1d to
26f2d52
Compare
Collaborator
|
Complexity decreasing per file
==============================
+ src/main/java/com/owncloud/android/ui/activity/BaseActivity.java -5
See the complete overview on Codacy |
Collaborator
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12569.apk |
Collaborator
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12570.apk |
Collaborator
Codacy337Lint
SpotBugs (new)
SpotBugs (master)
|
AndyScherzinger
approved these changes
Feb 6, 2020
tobiasKaminsky
approved these changes
Feb 10, 2020
delete-merged-branch
Bot
deleted the
ezaquarii/extract-account-logic-from-base-activity-into-mixin
branch
February 10, 2020 11:33
tobiasKaminsky
added a commit
that referenced
this pull request
Feb 11, 2020
92ddf10 Merge remote-tracking branch 'origin/master' into dev 5905b1c Merge pull request #5432 from nextcloud/ezaquarii/migrate-drawer-menu-utils-to-new-user-model 4be18ad Merge pull request #5064 from nextcloud/ezaquarii/extract-account-logic-from-base-activity-into-mixin 619b5d0 Merge pull request #5419 from nextcloud/dependabot/gradle/org.projectlombok-lombok-1.18.12 2d6e73d Merge pull request #5414 from nextcloud/fixContactCrash 1bb04aa also increase annotationProcessor 6048243 Fix crash: Caused by: java.lang.ClassCastException: java.lang.Object[] cannot be cast to java.lang.Void[] 0027df9 [tx-robot] updated from transifex 6dd5d92 Merge pull request #5443 from nextcloud/fixTransifex b4db9d0 do not break line on transifex b5fb9c1 Migrate drawer menu utilities to new user model a906a14 daily dev 20200208
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This PR moves some account-related shared logic in
BaseActivityinto a mix-in.My intention is to collect various account handling logic there, although it is still in a research phase.
@tobiasKaminsky @AndyScherzinger I tried to bring a test coverage to some acceptable level, but this code is so untestable that the task proven to be counter-productive. This code generally must go anyway.
The session mixin has the original, account-related code moved verbatim, without functional changes, so the mixin should behave indentically to the original and
#5031 (comment) is also accounted for.